<%--
  Created by IntelliJ IDEA.
  User: 12700
  Date: 2025/9/4
  Time: 8:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>物流员中心</title>
    <link rel="stylesheet" href="../../css/couriersranking.css">
    <script type="text/javascript" src="../../js/jquery-1.8.3.js"></script>
    <script type="text/javascript">
        var receiver = localStorage.getItem('savedUsername');
        $(document).ready(function () {
            var username = localStorage.getItem('savedUsername');
            $("<img src='../../images/touxiang.png'><p>"+username+"</p>").appendTo(".admincontroller");
            $.get("../../couriers/showdesc",{"indexpage":+1},function (ph) {
                showdt(ph);
            });
            $(document).on("click","input[name]",function () {
                var indexpage=$(this).attr("name");
                $.get("../../couriers/showdesc",{"indexpage":indexpage},function (ph) {
                    showdt(ph);
                });
            });
            $("[value='退出登录']").click(function () {
                window.location.href="../../index.jsp";
            });
        });

        function showdt(ph) {
            JSON.stringify(ph);
            $(".tbody").empty();
            for (i = 0; i < ph.listIndex.length; i++) {
                $("<div>" +
                    "                        <div><p>" + ph.listIndex[i].completed_packages + "</p></div>\n" +
                    "                        <div><p>" + ph.listIndex[i].current_packages + "</p></div>\n" +
                    "                        <div><p>" + ph.listIndex[i].id + "</p></div>\n" +
                    "                        <div><p>" + ph.listIndex[i].name + "</p></div>\n" +
                    "                        <div><p>" + ph.listIndex[i].phone + "</p></div>\n" +
                    "</div>").appendTo(".tbody");
            };

            $(".tfoot").empty();
            if (ph.pageIndex != 1) {
                $("<input type='button' value='首页' name='1'>").appendTo(".tfoot");
                $("<input type='button' value='上一页' name='" + (ph.pageIndex - 1) + "'>").appendTo(".tfoot");
            };
            $("<b>第" + ph.pageIndex + "页/共" + ph.pageCount + "页</b>").appendTo(".tfoot");
            if (ph.pageIndex != ph.pageCount) {
                $("<input type='button' value='下一页' name='" + (ph.pageIndex + 1) + "'>").appendTo(".tfoot");
                $("<input type='button' value='尾页' name='" + ph.pageCount + "'>").appendTo(".tfoot");
            };
        };
    </script>
</head>
<body>
<div class="head">
    <div class="icon"><img src="../../images/logo.png"></div>
    <div class="admin">
        <div class="admincontroller"></div>
        <div class="adminshow">
            <div><b>个人中心</b></div>
            <div><b>更多通知</b></div>
            <div><input type="button" value="退出登录"></div>
        </div>
    </div>
</div>
<div class="body">
    <div class="body-left">
        <img src="../../images/adv.jpg">
    </div>
    <div class="body-right">
        <div class="label">
            <div class="label-bar">
                <a href="Couriers.jsp"><div class="unselected">物流员信息管理</div></a>
                <a href="couriersstatus.jsp"><div class="unselected">配送任务管理</div></a>
                <a href="couriersranking.jsp"><div class="selected">绩效统计</div></a>
            </div>
            <div class="label-top">
                <div class="top-head"><b>物流员管理</b></div>
            </div>
            <div class="label-bottom">
                <div class="bottom-head">
                    <div><p>已完成包裹数</p></div>
                    <div><p>当前配送包裹数</p></div>
                    <div><p>物流员编号</p></div>
                    <div><p>姓名</p></div>
                    <div><p>手机号码</p></div>
                </div>
                <div class="tbody">

                </div>
                <div class="tfoot">
                    <tfoot>

                    </tfoot>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="foot"></div>
</body>
</html>
